import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import pinia from './stores'
import './permission'
import '@/assets/styles/index.scss'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css';
import * as Icons from '@ant-design/icons-vue'
import zhCN from 'ant-design-vue/es/locale/zh_CN'

const app = createApp(App)

// 配置Ant Design Vue
app.use(Antd, {
  locale: zhCN
})

// 配置路由
app.use(router)

// 配置Pinia状态管理
app.use(pinia)

// 全局注册Ant Design图标
const icons = Icons
for (const i in icons) {
  app.component(i, icons[i])
}

app.mount('#app')